In order to improve system speed and efficiency, it is well known to incorporate “cache” systems in computer systems. A cache is a hardware device or system configuration that enables a computer, or a computer network, to temporarily store copies of data subject to repetitive processing by the system, wherein the data copies can be accessed much more quickly from the cache than the original data from its permanent location.
In general, a cache is typically used by a computer to store a temporary copy of data stored in another memory location, enabling faster access than system memory look-up and retrieval architecture. The memory structures incorporated within computer systems typically include a memory cache which comprises buffer storage that contains instructions and data frequently accessed by one or more processors in the system, and provides faster access to data resident in the memory cache than in another memory location. Caches are typically constructed of cache lines which are boundaries between blocks of storage that map to a specific area in the cache. The cache lines are usually made up of a plurality of words having adjacent addresses. In order to provide a transactional advantage, the temporary copy in the cache should be data that has a high probability of being requested by the computer system. Therefore, cache systems are managed to predict future data requests and, accordingly, retrieve that data and copy it to the cache. Some prior art cache controllers select recently accessed data for cache storage, in anticipation that it will be soon be requested again. Similarly, some cache systems select data immediately adjacent to the most recently accessed data for cache storage, in anticipation that it is highly likely to be accessed in the immediate future.
Although caches provide significant advantages over RAM, remote server storage and other system memory resources for repetitive data operations, computer system economies necessarily limit cache sizes. It is thus desirable to efficiently manage cache resources to quickly free up cache resources for new data copies by providing for a means to efficiently identify and “flush” old data from the cache. Typical prior art cache management systems rely upon cache access history methods to chose the cache line to be flushed; assuming that the oldest data in the cache is most likely to be stale, the data that has been accessed the farthest in the past relative to the other cache lines is flushed to make room for new data when the cache is full. However, this assumption is simplistic, and does not value other characteristics which may indicate that the oldest data is nevertheless more likely to be requested than some newly cached data.
Another well known method for cache memory management is to take advantage of the locality of either data or command data fetches. For example, a common technique used to perform repetitive operations is to use a programming construct known as a “Do loop”. If the loop is rather small in the number of instructions to be repeated, it is likely that the entire loop can be contained in a single cache line. As such, repetitive execution of the loop will remain in the cache due to the close proximity or locality of the instructions in the memory address space to each other, thus achieving the fastest possible access to memory for the instructions.
What is needed is an improved cache management system to more efficiently and effectively cache data for system needs, by providing an improved means for identifying data most appropriate for caching. What is also needed is an improved means for prioritizing and identifying data most appropriate for flushing from the cache.